<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin extends CI_Controller { 
    private $page_load='';// chi dinh de load view nao. neu rong thi load mac dinh theo ten bang
    private $databk='';//data function run
    //phan trang
    private $base_url_trang = '#';
    private $total_rows = 100;
    private $per_page =20;
    ///
    function __construct(){
        parent::__construct();
        $this->load->library(array('form_validation','session','pagination'));
        $this->load->helper(array( 'url','alias_helper','text','form'));
        $this->load->model("Admin_model");    
        //$this->check_admin();
        if(!($this->session->userdata('logedin')&&$this->session->userdata('admin')==1)){
            redirect('admin/aduser');
            $this->inic->sysm();
            exit();
        }else{
            $this->session->set_userdata('upanh',1);
        }
    } 
    function index(){
        $this->load->view('admin/index',array('content'=>$content )); 
    }
}